<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>pixijs</title>
  <style>
    * {
      padding: 0;
      margin: 0
    }
  </style>
</head>

<body>

</body>
<script src="../js/pixi.js"></script>
<script>
  //Create a Pixi Application
  let app = new PIXI.Application({
    width: 256,
    height: 256,
    antialias: true,
    transparent: false,
    resolution: 1
  }
  );

  //Add the canvas that Pixi automatically created for you to the HTML document
  document.body.appendChild(app.view);

  //load an image and run the `setup` function when it's done
  console.log(PIXI);
  PIXI.loader
    .add("images/he.png")
    .load(setup);

  //This `setup` function will run when the image has loaded
  function setup() {

    //Create the cat sprite
    let cat = new PIXI.Sprite(PIXI.loader.resources["images/he.png"].texture);

    //Add the cat to the stage
    app.stage.addChild(cat);
  }
</script>

</html>